Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

ZERO(s(x)) → EQ(x, s(0))
IF(false, x, y) → PR(x, y)
PLUS(s(x), y) → P(s(x))
TIMES(s(x), y) → PLUS(y, times(x, y))
ZERO(s(x)) → PLUS(0, zero(0))
ZERO(s(x)) → PLUS(zero(0), 0)
TIMES(s(x), y) → TIMES(x, y)
PLUS(x, s(y)) → P(s(y))
DIVIDES(y, x) → EQ(x, times(div(x, y), y))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
PLUS(s(x), y) → PLUS(x, y)
DIVIDES(y, x) → DIV(x, y)
QUOT(x, 0, s(z)) → DIV(x, s(z))
QUOT(s(x), s(y), z) → QUOT(x, y, z)
PLUS(x, s(y)) → PLUS(x, p(s(y)))
DIV(x, y) → QUOT(x, y, y)
PRIME(s(s(x))) → PR(s(s(x)), s(x))
DIVIDES(y, x) → TIMES(div(x, y), y)
DIV(div(x, y), z) → ZERO(y)
DIV(div(x, y), z) → TIMES(zero(y), z)
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
EQ(s(x), s(y)) → EQ(x, y)
PLUS(s(x), y) → PLUS(p(s(x)), y)
ZERO(s(x)) → ZERO(0)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ZERO(s(x)) → EQ(x, s(0))
IF(false, x, y) → PR(x, y)
PLUS(s(x), y) → P(s(x))
TIMES(s(x), y) → PLUS(y, times(x, y))
ZERO(s(x)) → PLUS(0, zero(0))
ZERO(s(x)) → PLUS(zero(0), 0)
TIMES(s(x), y) → TIMES(x, y)
PLUS(x, s(y)) → P(s(y))
DIVIDES(y, x) → EQ(x, times(div(x, y), y))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
PLUS(s(x), y) → PLUS(x, y)
DIVIDES(y, x) → DIV(x, y)
QUOT(x, 0, s(z)) → DIV(x, s(z))
QUOT(s(x), s(y), z) → QUOT(x, y, z)
PLUS(x, s(y)) → PLUS(x, p(s(y)))
DIV(x, y) → QUOT(x, y, y)
PRIME(s(s(x))) → PR(s(s(x)), s(x))
DIVIDES(y, x) → TIMES(div(x, y), y)
DIV(div(x, y), z) → ZERO(y)
DIV(div(x, y), z) → TIMES(zero(y), z)
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
EQ(s(x), s(y)) → EQ(x, y)
PLUS(s(x), y) → PLUS(p(s(x)), y)
ZERO(s(x)) → ZERO(0)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 11 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


EQ(s(x), s(y)) → EQ(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(EQ(x1, x2)) = (3)x_2   
POL(s(x1)) = 4 + (2)x_1   
The value of delta used in the strict ordering is 12.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS(x, s(y)) → PLUS(x, p(s(y)))
PLUS(s(x), y) → PLUS(p(s(x)), y)
PLUS(s(x), y) → PLUS(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


PLUS(s(x), y) → PLUS(p(s(x)), y)
PLUS(s(x), y) → PLUS(x, y)
The remaining pairs can at least be oriented weakly.

PLUS(x, s(y)) → PLUS(x, p(s(y)))
Used ordering: Polynomial interpretation [25,35]:

POL(PLUS(x1, x2)) = (1/4)x_1   
POL(s(x1)) = 1/4 + (4)x_1   
POL(p(x1)) = (3/4)x_1   
The value of delta used in the strict ordering is 1/64.
The following usable rules [17] were oriented:

p(s(x)) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS(x, s(y)) → PLUS(x, p(s(y)))

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


PLUS(x, s(y)) → PLUS(x, p(s(y)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(PLUS(x1, x2)) = (3/2)x_2   
POL(s(x1)) = 13/4 + (4)x_1   
POL(p(x1)) = 1/2 + (1/4)x_1   
The value of delta used in the strict ordering is 93/32.
The following usable rules [17] were oriented:

p(s(x)) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(x), y) → TIMES(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TIMES(s(x), y) → TIMES(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(TIMES(x1, x2)) = (4)x_1   
POL(s(x1)) = 1 + (4)x_1   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

DIV(div(x, y), z) → ZERO(y)
QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
QUOT(s(x), s(y), z) → QUOT(x, y, z)
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(x, y) → QUOT(x, y, y)
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
DIVIDES(y, x) → DIV(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


QUOT(s(x), s(y), z) → QUOT(x, y, z)
The remaining pairs can at least be oriented weakly.

DIV(div(x, y), z) → ZERO(y)
QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(x, y) → QUOT(x, y, y)
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
DIVIDES(y, x) → DIV(x, y)
Used ordering: Polynomial interpretation [25,35]:

POL(zero(x1)) = 0   
POL(plus(x1, x2)) = x_1 + (1/4)x_2   
POL(DIVIDES(x1, x2)) = (4)x_2   
POL(eq(x1, x2)) = 0   
POL(quot(x1, x2, x3)) = 7/2 + (5/2)x_1 + (13/4)x_2 + (3/4)x_3   
POL(PR(x1, x2)) = (4)x_1   
POL(true) = 9/4   
POL(DIV(x1, x2)) = (4)x_1   
POL(pr(x1, x2)) = 11/4 + (4)x_1 + (2)x_2   
POL(p(x1)) = 9/4 + (1/2)x_1   
POL(IF(x1, x2, x3)) = (4)x_2   
POL(0) = 0   
POL(if(x1, x2, x3)) = 3/2 + (2)x_1 + (1/4)x_2 + (4)x_3   
POL(div(x1, x2)) = (4)x_1   
POL(QUOT(x1, x2, x3)) = (4)x_1   
POL(ZERO(x1)) = 0   
POL(times(x1, x2)) = 0   
POL(false) = 0   
POL(s(x1)) = 1/4 + (5/2)x_1   
POL(divides(x1, x2)) = 0   
The value of delta used in the strict ordering is 1.
The following usable rules [17] were oriented:

plus(x, 0) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

DIV(div(x, y), z) → ZERO(y)
QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(x, y) → QUOT(x, y, y)
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
DIVIDES(y, x) → DIV(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


DIV(div(x, y), z) → ZERO(y)
DIV(div(x, y), z) → DIV(x, times(zero(y), z))
The remaining pairs can at least be oriented weakly.

QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(x, y) → QUOT(x, y, y)
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
DIVIDES(y, x) → DIV(x, y)
Used ordering: Polynomial interpretation [25,35]:

POL(zero(x1)) = 0   
POL(plus(x1, x2)) = (4)x_1   
POL(DIVIDES(x1, x2)) = (2)x_2   
POL(eq(x1, x2)) = 0   
POL(quot(x1, x2, x3)) = 1/2 + (2)x_2 + (4)x_3   
POL(PR(x1, x2)) = (2)x_1   
POL(true) = 3/2   
POL(DIV(x1, x2)) = (1/2)x_1   
POL(pr(x1, x2)) = 3 + (4)x_1 + (3)x_2   
POL(p(x1)) = 5/2 + (7/2)x_1   
POL(IF(x1, x2, x3)) = (2)x_2   
POL(0) = 0   
POL(if(x1, x2, x3)) = 7/4 + (7/4)x_1 + (7/2)x_2 + (5/4)x_3   
POL(div(x1, x2)) = 1/2 + (4)x_1   
POL(QUOT(x1, x2, x3)) = (1/2)x_1   
POL(ZERO(x1)) = 0   
POL(times(x1, x2)) = 0   
POL(false) = 0   
POL(s(x1)) = 0   
POL(divides(x1, x2)) = (4)x_1 + (1/4)x_2   
The value of delta used in the strict ordering is 1/4.
The following usable rules [17] were oriented:

plus(x, 0) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

QUOT(x, 0, s(z)) → DIV(x, s(z))
ZERO(s(x)) → IF(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))
PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
DIV(x, y) → QUOT(x, y, y)
PR(x, s(s(y))) → DIVIDES(s(s(y)), x)
IF(false, x, y) → PR(x, y)
DIVIDES(y, x) → DIV(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ AND
QDP
                          ↳ QDPOrderProof
                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

QUOT(x, 0, s(z)) → DIV(x, s(z))
DIV(x, y) → QUOT(x, y, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


DIV(x, y) → QUOT(x, y, y)
The remaining pairs can at least be oriented weakly.

QUOT(x, 0, s(z)) → DIV(x, s(z))
Used ordering: Polynomial interpretation [25,35]:

POL(QUOT(x1, x2, x3)) = (2)x_2   
POL(DIV(x1, x2)) = 4 + (2)x_2   
POL(s(x1)) = 0   
POL(0) = 2   
The value of delta used in the strict ordering is 4.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ AND
                        ↳ QDP
                          ↳ QDPOrderProof
QDP
                              ↳ DependencyGraphProof
                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

QUOT(x, 0, s(z)) → DIV(x, s(z))

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ AND
                        ↳ QDP
QDP
                          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
IF(false, x, y) → PR(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


PR(x, s(s(y))) → IF(divides(s(s(y)), x), x, s(y))
The remaining pairs can at least be oriented weakly.

IF(false, x, y) → PR(x, y)
Used ordering: Polynomial interpretation [25,35]:

POL(zero(x1)) = 2 + (1/4)x_1   
POL(plus(x1, x2)) = 3/4 + (4)x_1   
POL(eq(x1, x2)) = 5/2   
POL(PR(x1, x2)) = 4 + (2)x_2   
POL(quot(x1, x2, x3)) = 5/2 + (3/2)x_1 + (4)x_3   
POL(true) = 11/4   
POL(pr(x1, x2)) = 7/4 + (3/4)x_1   
POL(p(x1)) = 4 + (4)x_1   
POL(IF(x1, x2, x3)) = 4 + (2)x_3   
POL(0) = 0   
POL(if(x1, x2, x3)) = 7/2 + (3)x_1 + (1/2)x_2 + (5/4)x_3   
POL(div(x1, x2)) = 1 + (4)x_1   
POL(times(x1, x2)) = (4)x_2   
POL(false) = 0   
POL(s(x1)) = 5/2 + (3/2)x_1   
POL(divides(x1, x2)) = 0   
The value of delta used in the strict ordering is 15/2.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ DependencyGraphProof
                      ↳ AND
                        ↳ QDP
                        ↳ QDP
                          ↳ QDPOrderProof
QDP
                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y) → PR(x, y)

The TRS R consists of the following rules:

p(0) → 0
p(s(x)) → x
plus(x, 0) → x
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(s(x), y) → s(plus(p(s(x)), y))
plus(x, s(y)) → s(plus(x, p(s(y))))
times(0, y) → 0
times(s(0), y) → y
times(s(x), y) → plus(y, times(x, y))
div(0, y) → 0
div(x, y) → quot(x, y, y)
quot(zero(y), s(y), z) → 0
quot(s(x), s(y), z) → quot(x, y, z)
quot(x, 0, s(z)) → s(div(x, s(z)))
div(div(x, y), z) → div(x, times(zero(y), z))
eq(0, 0) → true
eq(s(x), 0) → false
eq(0, s(y)) → false
eq(s(x), s(y)) → eq(x, y)
divides(y, x) → eq(x, times(div(x, y), y))
prime(s(s(x))) → pr(s(s(x)), s(x))
pr(x, s(0)) → true
pr(x, s(s(y))) → if(divides(s(s(y)), x), x, s(y))
if(true, x, y) → false
if(false, x, y) → pr(x, y)
zero(div(x, x)) → x
zero(divides(x, x)) → x
zero(times(x, x)) → x
zero(quot(x, x, x)) → x
zero(s(x)) → if(eq(x, s(0)), plus(zero(0), 0), s(plus(0, zero(0))))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.